//
//  TextFieldVC.m
//  智慧小区
//
//  Created by 高永杨 on 2017/3/20.
//  Copyright © 2017年 zhongchuang. All rights reserved.
//

#import "TextFieldVC.h"

@interface TextFieldVC ()<UITextViewDelegate>

@end

@implementation TextFieldVC
-(void)sendStr:(NSString *)nameStr andStr:(NSString *)detailStr
{
    
}
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
     
    [textField resignFirstResponder];
    return YES;
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
 replacementText:(NSString *)text

{
    
    // Any new character added is passed in as the "text" parameter
    
    if ([text isEqualToString:@"\n"]) {
        // Be sure to test for equality using the "isEqualToString" message
        [textView resignFirstResponder];
        // Return FALSE so that the final '\n' character doesn't get added
        return FALSE;
        
    }
    // For any other character return TRUE so that the text gets added to the view
    return TRUE;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
